var providerObj;
function openYesOrNoDLG(){
	$('.zhezhao').css('display', 'block');
	$('#removeProv').fadeIn();
}

function cancleBtn(){
	$('.zhezhao').css('display', 'none');
	$('#removeProv').fadeOut();
}
function changeDLGContent(contentStr){
	var p = $(".removeMain").find("p");
	p.html(contentStr);
}
$(function(){
	$(".viewContract").on("click",function(){
		//将被绑定的元素（a）转换成jquery对象，可以使用jquery方法
		var obj = $(this);
		window.location.href=path+"/selectById?id="+ obj.attr("id");
	});
	
	$(".modifyContract").on("click",function(){
		var obj = $(this);
		window.location.href=path+"/updateContract?id="+ obj.attr("id");
	});

	$('#no').click(function () {
		cancleBtn();
	});
	
	$('#yes').click(function () {
		/*deleteProvider(providerObj);*/
		window.location.href=path+"/delete?id="+ providerObj.attr("id");
	});

	$(".deleteContract").on("click",function(){
		providerObj = $(this);
		changeDLGContent("你确定要删除供应商【"+providerObj.attr("proname")+"】吗？");
		openYesOrNoDLG();
	});
	

});